package com.hurr.service.impl;

import java.util.Collection;

import com.hurr.bo.Expense;
import com.hurr.dao.ExpenseDao;
import com.hurr.service.ExpenseService;

/**
 * Implemetation for Expense Service
 * 
 * @author Fernando Perelli
 * 
 */
public class ExpenseServiceImpl implements ExpenseService {

	/**
	 * Dao for expense
	 */
	private ExpenseDao expenseDao;

	/**
	 * Set ExpenseDao
	 * 
	 * @param expenseDao
	 */
	public void setExpenseDao(ExpenseDao expenseDao) {
		this.expenseDao = expenseDao;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see com.hurr.service.ExpenseService#save(com.hurr.bo.Expense)
	 */
	@Override
	public Expense save(Expense expense) {
		return expenseDao.save(expense);
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see com.hurr.service.ExpenseService#update(com.hurr.bo.Expense)
	 */
	@Override
	public void update(Expense expense) {
		expenseDao.update(expense);
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see com.hurr.service.ExpenseService#delete(com.hurr.bo.Expense)
	 */
	@Override
	public void delete(Expense Expense) {
		expenseDao.delete(Expense);
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see com.hurr.service.ExpenseService#findById(java.lang.Long)
	 */
	@Override
	public Expense findById(Long id) {
		return expenseDao.findById(id);
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see com.hurr.service.ExpenseService#findAll()
	 */
	@Override
	public Collection<Expense> findAll() {
		return expenseDao.findAll();
	}

}
